<template>
  <div class="level-one">
    <ul>
      <li @click="getshowOneChild">我的出售和求购
        <div class="messagebox">36</div>
        <i v-if="showOneChild == false" class="el-icon-arrow-right"></i>
        <i v-else class="el-icon-arrow-down"></i>
      </li>
      <div class="conlay" v-show="showOneChild">
        <ul>
          <li v-for="v in peoplecenterlist" :key="v.value" :class="{active:v.value==active}"
              @click="getpeoplecenterlist(v)">
            {{ v.name }}
            <i class="el-icon-arrow-right" :class="{activetwo:active == v.value}"></i>
            <div class="messagebox" v-if="v.message !=0">{{ v.message }}</div>
          </li>
        </ul>
        <div class="content">
          <router-view></router-view>
        </div>
      </div>
      <li>我的消息 <i class="el-icon-arrow-right"></i></li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "nvaList",
  data() {
    return {
      active: 10, //高亮
      showOneChild: false,
      peoplecenterlist: [
        {
          name: "商业拍卖",
          value: 0,
          routerlink: "/peoplecenter",
          message: "5",
        },
        {
          name: "资产挂牌",
          value: 1,
          routerlink: "/myassetslisted",
          message: "6",
        },
        {
          name: "挂牌拍卖",
          value: 2,
          routerlink: "/assetslistedbidding",
          message: "",
        },
        {
          name: "罚没资产",
          value: 3,
          routerlink: "/judicialbidding",
          message: "",
        },
        {name: "我的求购", value: 4, routerlink: "/mybuy", message: ""},
        {name: "我的出售", value: 5, routerlink: "/mysell", message: ""},
        {name: "我的关注", value: 6, routerlink: "/myfocus", message: ""},
        {name: "交易服务", value: 7, routerlink: "/myfund", message: ""},
        {name: "我的消息", value: 8, routerlink: "/mynews", message: ""},
      ]
    }
  },
  methods: {
    getpeoplecenterlist() {

    },
    getshowOneChild(){
      this.showOneChild = !this.showOneChild
    }
  }
}
</script>

<style scoped lang="scss">
.level-one ul{
  font-weight: 400;
  color: rgba(51, 51, 51, 1);
  list-style: none;
  width: 189px;
  line-height: 50px;
  font-size: 16px;
  li{
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    width: 189px;
    height: 49px;
    background: #F8F8F8;
    border-radius: 4px;
    margin-bottom: 10px;
    .messagebox {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #E5544D;
      position: absolute;
      left: 151px;
      top: 15px;
      color: #fff;
      text-align: center;
      line-height: 20px;
      font-size: 12px;
    }
    i{
      line-height: 50px;
    }
  }
  .conlay {
    list-style: none;
    width: 100%;
    display: flex;
    justify-content: space-between;
    ul {
      width: 189px;
      li {
        display: flex;
        justify-content: space-between;
        width: 100%;
        height: 30px;
        border-radius: 5px;
        font-size: 16px;
        font-weight: 400;
        color: rgba(51, 51, 51, 1);
        line-height: 30px;
        cursor: pointer;
        position: relative;
        background-color: white;
        i {
          float: right;
          line-height: 30px;
          color: #999999;
          font-weight: bold;
        }
      }
      .messagebox {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #E5544D;
        position: absolute;
        left: 112px;
        top: 3px;
        color: #fff;
        text-align: center;
        line-height: 20px;
        font-size: 12px;
      }
    }
  }
}

</style>
